package com.city.domain.economic;

import javax.persistence.*;
import java.util.Objects;

/**
 * @deprecation: 安全管理机构人员名单
 * @dmail: 398521613@qq.com
 * @author: L-H
 * @date: 2018-07-18 13:14
 */
@Entity
@Table(name = "enterprise_umagency_person", schema = "city", catalog = "")
public class EnterpriseUmagencyPerson {
    private int id; //主键
    private int umaId;//单位安全管理机构编号,与单位安全管理机构中编号对应
    private int userId;//机构人员编号,与基本人员信息表中对应
    private String userName;//机构人员性别

    @Id
    @Column(name = "id")
    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    @Basic
    @Column(name = "uma_id")
    public int getUmaId() {
        return umaId;
    }

    public void setUmaId(int umaId) {
        this.umaId = umaId;
    }

    @Basic
    @Column(name = "user_id")
    public int getUserId() {
        return userId;
    }

    public void setUserId(int userId) {
        this.userId = userId;
    }

    @Basic
    @Column(name = "user_name")
    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        EnterpriseUmagencyPerson that = (EnterpriseUmagencyPerson) o;
        return id == that.id &&
                umaId == that.umaId &&
                userId == that.userId &&
                Objects.equals(userName, that.userName);
    }

    @Override
    public int hashCode() {

        return Objects.hash(id, umaId, userId, userName);
    }
}
